<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

$this->pageTitle=Yii::app()->name . ' - Đăng nhập';
$this->breadcrumbs=array(
	'Đăng nhập',
);
?>

<h1>Đăng nhập hệ thống</h1>

<p>Điền thông tin đăng nhập:</p>

<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
	
	<p class="note">Điền đầy đủ vào vị trí có dấu <span class="required">*</span>.</p>
	<table width="50%">
		<tr>
			<div class="row">
				<td width="30%"><?php echo $form->labelEx($model,'username'); ?></td>
				<td width="40%"><?php echo $form->textField($model,'username'); ?></td>
				<td><?php echo $form->error($model,'username'); ?></td>
			</div>
		</tr>
		<tr>
			<div class="row">
				<td><?php echo $form->labelEx($model,'password'); ?></td>
				<td><?php echo $form->passwordField($model,'password'); ?></td>
				<td><?php echo $form->error($model,'password'); ?></td>
			</div>
		</tr>
		<tr>
			<div class="row">
				<td><?php echo $form->labelEx($model,'namhocLF'); ?></td>
				<td><?php
					$now=getdate();
					$yearnow=$now['year'];
					$year=array();
					for($i=$now['year']-7;$i<=$now['year'];$i++)
						$year[$i]=$i.' - '.($i+1);
					if($now['month']<8)
					{
						$yearnow-=1;
					}
				echo $form->dropDownList($model,'namhocLF',$year,array('options'=>array($yearnow=>array('selected'=>'selected')))); ?></td>
				<td><?php //echo $form->error($model,'username'); ?></td>
			</div>
		</tr>
		<tr>
			<div class="row buttons">
				<td></td>
				<td><?php echo CHtml::submitButton('Đăng nhập',array('id'=>'btnsubmitLF')); ?></td>
				<td></td>
			</div>
		</tr>
	</table>
<?php $this->endWidget(); ?>
</div><!-- form -->
